import { request } from '@umijs/max';

// 获取商品分类列表
export async function getCategory(params: API.CategoryAdminParams) {
  return request<API.QueryResult>(`/categories`, {
    method: 'GET',
    params,
    headers: {
      token: localStorage.getItem('token') || '',
    },
  });
}
